<%--
  Created by IntelliJ IDEA.
  User: 17445
  Date: 2022/8/27
  Time: 16:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>编辑订单</title>
  <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/admin/car/fontsawesome/css/font-awesome.css"/>
  <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/admin/car/css/style.css"/>
</head>
<body>
<c:forEach items="${list}" var="s">
<div class="main_box">
  <div class="cont_box">
    <!--订单号-->
    <div class="user_top">订单号：<span>${s.e_order_number}</span></div>
    <!--订单商品-->
    <div class="user_top order_top">订单商品：</div>
    <table border="0" cellspacing="0" cellpadding="0" class="table">
      <thead>
      <tr>
        <th>商品名称</th>
        <th>商品价格</th>
        <th>商品实际销售价格</th>
        <th>销售人员</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      <tr>
<%--        <c:if test="${s.j_letem_id=null}">--%>
        <td>${s.j_letem_name}</td>
        <td>${s.j_price}</td>
        <td>${s.j_shijixiaoshou}</td>
        <td>${s.z_name}</td>
        <td>
          <a href="${pageContext.request.contextPath}/ordersC/deletebyid?D_Comment_number=${s.d_Comment_number}" class="table_btn table_del del_btn">
            <i class="fa fa-trash-o"></i>
            <span>删除</span>
          </a>
        </td>
<%--        </c:if>--%>
      </tr>
      </tbody>
    </table>
    <div class="clearfix" style="margin-top:20px;">
      <input type="submit" value="添加商品" class="btn line_btn">
    </div>
    <!--订单服务-->
    <div class="user_top order_top">订单服务：</div>
    <table border="0" cellspacing="0" cellpadding="0" class="table pre_table">
      <thead>
      <tr>
        <th>服务名称</th>
        <th>服务价格</th>
        <th>服务实际支付价格</th>
        <th>施工人员</th>
        <th>销售人员</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      <tr>
        <td>${s.namess}</td>
        <td>${s.fw_money}</td>
        <td>${s.fw_moneyshiji}</td>
        <td>${s.z_name}</td>
        <td>${s.z_name}</td>
        <td>
          <a href="${pageContext.request.contextPath}/ordersC/deletebyid?D_Comment_number=${s.d_Comment_number}" class="table_btn table_del del_btn">
            <i class="fa fa-trash-o"></i>
            <span>删除</span>
          </a>
        </td>
      </tr>
      </tbody>
    </table>
    <div class="clearfix" style="margin-top:20px;">
      <input type="submit" value="添加服务" class="btn line_btn">
    </div>
    <!--订单备注-->
    <div class="user_top order_top">订单备注：</div>
    <textarea class="order_note">${s.e_order_remarks}</textarea>
    <div class="clearfix" style="margin-top:20px;">
      <input type="submit" value="确认保存" class="btn blue_btn total_btn">
    </div>
  </div>
</div>
</c:forEach>
<!--javascript include-->
<script src="js/jquery-2.2.1.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/jquery.form.min.js"></script>
<script src="js/other.js"></script>
<script>
  $(function(){
    tableShow();
    $(".del_btn").click(function(){
      if($(this).parents("tbody").find("tr").length<=1){
        $(this).parents(".table").prev().remove();
        $(this).parents(".table").remove();
      }else{
        $(this).parents("tr").remove();
      }
    });
  });
  function tableShow(){
    $(".table").each(function(){
      if($(this).find("tbody tr").length<=0){
        $(this).prev().remove();
        $(this).remove();
      }
    });
  }
</script>
</body>
</html>